import request from '@/utils/request'

// 查询【请填写功能名称】列表
export function listTopology(query) {
  return request({
    url: '/monitor/topology/list',
    method: 'get',
    params: query
  })
}

// 查询【请填写功能名称】详细
export function getTopology(id) {
  return request({
    url: '/monitor/topology/' + id,
    method: 'get'
  })
}

// 新增【请填写功能名称】
export function addTopology(data) {
  return request({
    url: '/monitor/topology',
    method: 'post',
    data: data
  })
}

// 修改【请填写功能名称】
export function updateTopology(data) {
  return request({
    url: '/monitor/topology',
    method: 'put',
    data: data
  })
}

// 删除【请填写功能名称】
export function delTopology(id) {
  return request({
    url: '/monitor/topology/' + id,
    method: 'delete'
  })
}

// 节点图片上传并转为base64
export function uploadToBase64(data) {
  return request({
    url: '/monitor/topology/uploadToBase64',
    method: 'post',
    data: data
  })
}

// 上传为XML
export function uploadXml(data) {
  return request({
    url: '/monitor/topology/uploadXml',
    method: 'post',
    data: data
  });
}
